package me.leiusual.sharing.repository.datasource

import androidx.paging.DataSource
import me.leiusual.sharing.api.ApiSharing
import me.leiusual.sharing.api.model.storeproductquery.Product

/**
 * author: leiusual
 * create on: 2019-07-26
 * description:
 */
class ProductDataSourceFactory(
    private val apiSharing: ApiSharing,
    private val storeId: Long,
    private val storeAreaId: Long,
    private val categoryId: Long
) : DataSource.Factory<Long, Product>() {

  override fun create(): DataSource<Long, Product> {
    return ProductDataSource(apiSharing, storeId, storeAreaId, categoryId)
  }
}